package com.ali.entity;

import com.ali.common.OrderStatusEnum;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;

//指定表
@TableName(value = "boot_order")
@Data
public class Order implements Serializable {
    //指定主键，value：数据库字段，type：主键生成策略
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    private String orderNo;
    private OrderStatusEnum status;
    //自动填充
    @TableField(fill = FieldFill.INSERT)
    private long createTime;
    //自动填充
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private long updateTime;
    //乐观锁版本号标识
    @Version
    private Integer version;
    //逻辑删除
    @TableLogic
    private int isDelete;
}
